A semiconductor device including semiconductor elements such as a diode, a metal oxide semiconductor field effect transistor (MOSFET), and an insulated gate bipolar transistor (IGBT) is widely used in various applications including power control. The size of a semiconductor device is desirably small.